import 'package:ecy_app_flutter/routes/goods/model/EcyGoodsSkuModel.dart';
import 'package:json_annotation/json_annotation.dart';
part 'EcyOrderPrePayModel.g.dart';

@JsonSerializable()
class EcyOrderPrePayModel {
  String? skuid;
  String? id;
  String? name;
  String? goodsPrice;
  String? shippingFeePrice;
  String? totalPrice;
  String? payWay; //0或空为支付宝 1为微信
  String? totalNum;
  String? notes;
  String? orderType;
  String? shopId;
  bool? cartFlag;
  List<EcyGoodsSkuModel>? skuList;
  EcyOrderPrePayModel(
      this.skuid,
      this.id,
      this.name,
      this.goodsPrice,
      this.shippingFeePrice,
      this.totalPrice,
      this.payWay,
      this.orderType,
      this.totalNum,
      this.notes,
      this.shopId,
      this.cartFlag,
      this.skuList);

  // 从JSON创建User实例的工厂方法
  factory EcyOrderPrePayModel.fromJson(Map<String, dynamic> json) =>
      _$EcyOrderPrePayModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyOrderPrePayModelToJson(this);
}
